<script type="text/javascript">
	$(function() {
	    $.fn.dataGridOptions.formSubFun("#form",'/modules/loan/borrow/stopBorrow.html');		
	});
</script>
<div class="popShow">
	<h1 class="borrowTitle"><span>标名：</span>${borrow.name}</h1>
	<div class="showItem">
		<span>借款人：</span>
		${borrowUser}
	</div>
	<div class="showItem">
		<span>状态：</span>
		<#if borrow.status == -1>
			已撤回
		<#elseif borrow.status == 0>
			等待初审
		<#elseif borrow.status == 1 && borrow.accountYes == borrow.account>
			满标待审
		<#elseif borrow.status==1>
			招标中
		<#elseif borrow.status==2>
			初审未通过
		<#elseif borrow.status==3>
			复审通过
		<#elseif borrow.status==4 || borrow.status==49>
			复审未通过
		<#elseif borrow.status==5 || borrow.status==59>
			用户取消
		<#elseif borrow.status==6>
			还款中
		<#elseif borrow.status==7>
			部分还款
		<#elseif borrow.status==8>
			<#if borrow.type==110 >
			停止流转
			<#else>
			还款成功
			</#if>
		<#else>
			错误状态
		</#if>
	</div>
	<div class="showItem">
		<span>进度：</span>
		${borrow.scales}%
	</div>
	<div class="showItem">
		<span>借款用途：</span>
		<@linkage plantext='plantext' default=borrow.borrowUse nid="borrow_use"/>
	</div>
	<div class="showItem">
		<span>借款期限：</span>
		<#if borrow.borrowTimeType==1>${borrow.timeLimit!"-"} 天<#else>${borrow.timeLimit!"-"} 个月</#if>
	</div>
	<div class="showItem">
		<span>还款方式：</span>
		<@linkage plantext='plantext' default=borrow.style nid="borrow_style"/>
	</div>
	<div class="showItem">
		<span>借款总金额：</span>
		${borrow.account} 元
	</div>
	<div class="showItem">
		<span>年利率：</span>
		${borrow.apr} %
	</div>
	<#if borrow.type!=110>	
	<div class="showItem">
		<span>最低投标金额：</span>
		<#if borrow.lowestAccount??&&borrow.lowestAccount?number gt 0>${borrow.lowestAccount}元<#else>无限制</#if>
	</div>
	<div class="showItem">
		<span>最多投标总额：</span>
		<#if borrow.mostAccount??&&borrow.mostAccount?number gt 0>${borrow.mostAccount}元<#else>无限制</#if>
	</div>
	</#if>
	<#if borrow.type==110>
	<div class="showItem">
		<span>单笔最低投标金额：</span>
		<#if borrow.lowestSingleLimit??&&borrow.lowestSingleLimit?number gt 0>${borrow.lowestSingleLimit}元<#else>无限制</#if>
	</div>
	<div class="showItem">
		<span>单笔最多投标总额：</span>
		<#if borrow.mostSingleLimit??&&borrow.mostSingleLimit?number gt 0>${borrow.mostSingleLimit}元<#else>无限制</#if>
	</div>
	</#if>
	<div class="showItem">
		<span>添加时间：</span>
		${borrow.addTime?string("yyyy-MM-dd HH:mm:ss")}
	</div>
	<div class="showItem">
		<span>IP：</span>
		${borrow.addIp}
	</div>
</div>
<form id="form" method="post">
	<input name="id" value="${borrow.id}" type="hidden"/>
</form>

<script type="text/javascript">
    $(function() {
        $('#tenderListGrid').datagrid({
            url : '/modules/loan/borrow/tenderDetailList.html?borrowId=${borrow.id}',
            fit : true,
            fitColumns : true,
            border : false,
            pagination : true,
            idField : 'id',
            pageSize : pageSize,
            pageNums :1,
            pageList : pageList,
            sortName : 'id',
            sortOrder : 'asc',
            columns : [ [
              { field: 'userName', title: '投标人', width: 80,fixed:true, sortable:false },
              { field: 'money', title: '投标金额', width: 80, fixed:true, sortable:false,formatter:function(value,row,index){
            	  return value+"元";
              } },  
              { field: 'account', title: '有效投标金额', width:100,fixed:true,sortable:false,formatter:function(value,row,index){
            	  return value+"元";
              } },
              { field: 'repaymentAccount', title: '回收本息', width: 80,fixed:true,  sortable:false formatter:function(value,row,index){
            	  return value+"元";
              }}, 
              { field: 'tenderType', title: '投标类型', width: 80, fixed:true, sortable:false,formatter: function(value,row,index){
            	  if(value==0){
            		  return '网站投标';
            	  }else if(value==1){
            		  return '自动投标';
            	  }else if(value==2){
            		  return '手机投标';
            	  }
              } }, 
              { field: 'addTime', title: '投标时间', width: 150, fixed:true, sortable:false,formatter: function(value,row,index){
            	  return getLocalTime(value,4);
              	} 
              }, 
              { field: 'addIp', title: '投标IP', width: 120, fixed:true, sortable:false }
             ]]
        }); 
        
    });
</script>

<table id="tenderListGrid"></table>
